﻿using System.ComponentModel.Composition;
using IntoNails.Modules.CategoryManagement.ViewModels;

namespace IntoNails.Modules.CategoryManagement.Views
{
    /// <summary>
    /// Interaction logic for CategoryListView.xaml
    /// </summary>
    [Export(typeof(ICategoryTreeView))]
    [PartCreationPolicy(CreationPolicy.NonShared)]
    public partial class CategoryTreeView : ICategoryTreeView
    {
        [ImportingConstructor]
        public CategoryTreeView(ICategoryTreeViewModel viewModel)
        {
            InitializeComponent();
            this.DataContext = viewModel;
        }

        ////[Import]
        ////public ICategoryTreeViewModel ViewModel
        ////{
        ////    get { return this.DataContext as ICategoryTreeViewModel; }
        ////    set { this.DataContext = value; }
        ////}
    }
}
